﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="ExpiredMortageBulk.aspx.cs" Inherits="Mortgage.Form.ExpiredMortageBulk" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <title>Xét duyệt quá hạn đơn cẩm đồ </title>
    <script type="text/javascript" src='<%= ResolveClientUrl("~/Scripts/jquery-window-5.03/jquery.window.min.js") %>'></script>
    <script type="text/javascript">
        $(document).ready(function () {
            
            $('#chkAll').click(function () {
                var checked = $(this).attr('checked');
                $("input[id *= 'chkBulk']").attr('checked', checked);
                }
            );
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="filter">
        <label for="fldFltMortdate" title="Ngày">
            Ngày mốc:<span class="required">*</span></label>
        <asp:TextBox ID="fldFltMortdate" runat="server" CssClass="dtePicker" />
        <asp:RequiredFieldValidator ID="reqfldFltMordate" runat="server" Display="Dynamic"
            ErrorMessage="*" ControlToValidate="fldFltMortdate" />
        <asp:Button ID="btnSearch" runat="server" Text="Filter(Lọc)" OnClick="btnFilter_Click" />
        &nbsp;
        <asp:Button ID="btnBulk" runat="server" Text="Bulk (Chuyển trạng thái)" OnClick="btnBulk_Click"
            Enabled="false" />
        &nbsp;
        <asp:Label ID="lblMess" runat="server" />
    </div>
    <div class="grid" style="min-height: 450px;">
        <center>
            <table cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td>
                        <asp:GridView ID="grid" runat="server" AutoGenerateColumns="False" BackColor="White"
                            BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" DataKeyNames="ID"
                            CellPadding="3" EnableModelValidation="True">
                            <EmptyDataTemplate>
                                <div class="noData">
                                    Không có dữ liệu!</div>
                            </EmptyDataTemplate>
                            <Columns>
                                <asp:TemplateField ItemStyle-Width="20px">
                                    <HeaderTemplate>
                                        <input type="checkbox" id="chkAll" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkBulk" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="SerialNo" HeaderText="No" ItemStyle-Width="80px" ReadOnly="True"
                                    SortExpression="SerialNo">
                                    <ItemStyle Width="50px"></ItemStyle>
                                </asp:BoundField>
                                <%--<asp:TemplateField HeaderText="Lọai" ItemStyle-Width="200px" SortExpression="InterestRate">
                                    <ItemTemplate>
                                        <asp:Label ID="lblInterCode" runat="server" Text='<%#  Mortgage.Utility.GetInterestCode(  Convert.ToInt32( Eval("Inter_ID")) ).Value %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>--%>
                                <asp:TemplateField HeaderText="Số ngày(Hethan)" ItemStyle-Width="100px">
                                    <ItemTemplate>
                                        <asp:Label ID="lblNumOfDayExpire" runat="server" Text='<%#  Convert.ToInt32( Eval("NumDayExpire")) %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ngày" SortExpression="MorDate">
                                    <ItemTemplate>
                                        <asp:Label ID="lblMorDate" runat="server" Text='<%#   Eval("MorDate","{0:d}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle Width="150px" />
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Ngày Hết hạn" SortExpression="MorDate">
                                    <ItemTemplate>
                                        <asp:Label ID="lblMorDateExpired" runat="server" Text='<%#  string.Format( "{0:d}", Convert.ToDateTime(Eval("MorDate","{0:d}")).AddDays(Convert.ToInt32( Eval("NumDayExpire")))) %>'></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle Width="150px" />
                                </asp:TemplateField>
                                   <asp:BoundField DataField="ItemName" HeaderText="Tên vật cầm" ItemStyle-Width="200px" ReadOnly="True"
                                    SortExpression="ItemName">
                                    <ItemStyle Width="200px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="CustomerName" HeaderText="Tên người" ItemStyle-Width="200px" ReadOnly="True"
                                    SortExpression="CustomerName">
                                    <ItemStyle Width="200px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="MorMoney" HeaderText="Tiền cầm(VND)" ItemStyle-Width="150px"
                                    ItemStyle-CssClass="number" DataFormatString="{0:#,# VND}" ReadOnly="True" SortExpression="MorMoney">
                                    <ItemStyle Width="150px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="MoneyAmount" HeaderText="Tiền thu(VND)" ItemStyle-Width="150px"
                                    ItemStyle-CssClass="number" DataFormatString="{0:#,# VND}" ReadOnly="True" SortExpression="MoneyAmount">
                                    <ItemStyle Width="150px"></ItemStyle>
                                </asp:BoundField>
                                <asp:BoundField DataField="BillDate" HeaderText="Ngày đóng tiền(VND)" ItemStyle-Width="150px"
                                    DataFormatString="{0:d}" ReadOnly="True" SortExpression="BillDate">
                                    <ItemStyle Width="150px"></ItemStyle>
                                </asp:BoundField>
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Center" />
                            <RowStyle ForeColor="#000066" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                    </td>
                </tr>
            </table>
        </center>
    </div>
</asp:Content>
